import { LayoutRouteType } from './types';

// 推普活动H5项目后台管理系统路由配置
export default {
  routes: <LayoutRouteType[]>[
    {
      path: '/',
      redirect: '/dashboard',
    },
    {
      name: '登录',
      path: '/login',
      component: './Login',
      menuRender: false,
      footerRender: false,
      headerRender: false,
      hideInMenu: true,
      layout: false,
    },
    {
      name: '仪表盘',
      path: '/dashboard',
      component: './Dashboard',
      icon: 'DashboardOutlined',
      wrappers: ['@/wrappers/auth'],
    },
    {
      name: '用户管理',
      path: '/user-management',
      icon: 'UserOutlined',
      wrappers: ['@/wrappers/auth'],
      routes: [
        { path: '/user-management/', redirect: '/user-management/user-list' },
        { name: '用户列表', path: '/user-management/user-list', component: './UserManagement/UserList' },
        { name: '用户统计', path: '/user-management/user-statistics', component: './UserManagement/UserStatistics' },
      ],
    },
    {
      name: '课程管理',
      path: '/course-management',
      icon: 'BookOutlined',
      wrappers: ['@/wrappers/auth'],
      routes: [
        { path: '/course-management/', redirect: '/course-management/course-list' },
        { name: '课程列表', path: '/course-management/course-list', component: './CourseManagement/CourseList' },
        { name: '课程分类', path: '/course-management/category-list', component: './CourseManagement/CategoryList' },
      ],
    },
    {
      name: '内容管理',
      path: '/content-management',
      icon: 'FileTextOutlined',
      wrappers: ['@/wrappers/auth'],
      routes: [
        { path: '/content-management/', redirect: '/content-management/banner-list' },
        { name: '轮播图管理', path: '/content-management/banner-list', component: './ContentManagement/BannerList' },
        { name: '活动管理', path: '/content-management/activity-list', component: './ContentManagement/ActivityList' },
      ],
    },
    {
      name: '学习内容管理',
      path: '/learning-content-management',
      icon: 'ReadOutlined',
      wrappers: ['@/wrappers/auth'],
      routes: [
        { path: '/learning-content-management/', redirect: '/learning-content-management/detection-text-list' },
        { name: '检测文本', path: '/learning-content-management/detection-text-list', component: './LearningContentManagement/DetectionTextList' },
        { name: '游戏内容', path: '/learning-content-management/game-content-list', component: './LearningContentManagement/GameContentList' },
        { name: '每日一句', path: '/learning-content-management/daily-sentence-list', component: './LearningContentManagement/DailySentenceList' },
      ],
    },
    {
      name: '系统管理',
      path: '/system-management',
      icon: 'SettingOutlined',
      wrappers: ['@/wrappers/auth'],
      routes: [
        { path: '/system-management/', redirect: '/system-management/notification-list' },
        { name: '通知管理', path: '/system-management/notification-list', component: './SystemManagement/NotificationList' },
        { name: '文件管理', path: '/system-management/file-list', component: './SystemManagement/FileList' },
        { name: '成就管理', path: '/system-management/achievement-list', component: './SystemManagement/AchievementList' },
      ],
    },
    {
      name: '数据统计',
      path: '/data-statistics',
      icon: 'BarChartOutlined',
      wrappers: ['@/wrappers/auth'],
      routes: [
        { path: '/data-statistics/', redirect: '/data-statistics/user-stats' },
        { name: '用户统计', path: '/data-statistics/user-stats', component: './DataStatistics/UserStats' },
        { name: '学习统计', path: '/data-statistics/learning-stats', component: './DataStatistics/LearningStats' },
        { name: '内容统计', path: '/data-statistics/content-stats', component: './DataStatistics/ContentStats' },
        { name: '系统统计', path: '/data-statistics/system-stats', component: './DataStatistics/SystemStats' },
      ],
    },
    {
      name: '日志管理',
      path: '/log-management',
      icon: 'FileSearchOutlined',
      wrappers: ['@/wrappers/auth'],
      routes: [
        { path: '/log-management/', redirect: '/log-management/operation-logs' },
        { name: '操作日志', path: '/log-management/operation-logs', component: './LogManagement/OperationLogs' },
        { name: '系统日志', path: '/log-management/system-logs', component: './LogManagement/SystemLogs' },
        { name: '错误日志', path: '/log-management/error-logs', component: './LogManagement/ErrorLogs' },
      ],
    },
  ],
};
